package cn.virens.util.poi.exception;

import org.apache.poi.ss.usermodel.Cell;

public class ExcelCellException extends ExcelRowException {
	private static final long serialVersionUID = -4695596792277438038L;

	private int cellIndex;

	public ExcelCellException(Cell cell, String message) {
		this(cell, message, null);
	}

	public ExcelCellException(Cell cell, String message, Throwable cause) {
		super(cell.getRow(), message, cause);

		this.cellIndex = cell.getColumnIndex();
	}

	public ExcelCellException(int cell, int row, String message) {
		this(cell, row, message, null);
	}

	public ExcelCellException(int cell, int row, String message, Throwable cause) {
		super(row, message, cause);

		this.cellIndex = cell;
	}

	public int getCellIndex() {
		return cellIndex;
	}

}
